package com.andkrup.ds {
	import flash.events.IEventDispatcher;

	import com.adobe.net.URI;	
	
	import flash.net.URLRequest;	
	
	/**
	 * @author Andkrup
	 */
	public class LoaderRequest {
		public var uri:URI;
		public var loader:Object;
		public var request:URLRequest;
		
		public function LoaderRequest(loader:IEventDispatcher, request:URLRequest, uri:URI){
			this.loader = loader;
			this.request = request;
			this.uri = uri;
		}
		public function load():void{
			try{
				loader.load(request);
			}
			catch(err:Error){
				trace("LoaderRequest:> load() error: loader has no load method. ("+typeof(loader)+"), stack:\n"+err.getStackTrace());
			}
		}
	}
}
